/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ro.model.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 
 * @author L842359
 */
@Entity
@Table(name = "historico")
public class Historico implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	@Column(name = "id")
	private Integer id;
	@Column(name = "descricao")
	private String descricao;
	@Column(name = "nomeArquivo")
	private String nomeArquivo;
	@Column(name = "caminhoArquivo")
	private String caminhoArquivo;
	@Column(name = "dtLancamento")
	@Temporal(TemporalType.TIMESTAMP)
	private Date dtLancamento;
	@JoinColumn(name = "ocorrencia_id", referencedColumnName = "id")
	@ManyToOne(optional = false)
	private Ocorrencia ocorrenciaId;
	@JoinColumn(name = "filaStatusExecucao_id", referencedColumnName = "id")
	@ManyToOne
	private StatusExecucao filaStatusExecucaoid;
	@JoinColumn(name = "usuario_id", referencedColumnName = "id")
	@ManyToOne(optional = false)
	private Usuario usuarioId;

	public Historico() {
	}

	public Historico(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public String getNomeArquivo() {
		return nomeArquivo;
	}

	public void setNomeArquivo(String nomeArquivo) {
		this.nomeArquivo = nomeArquivo;
	}

	public String getCaminhoArquivo() {
		return caminhoArquivo;
	}

	public void setCaminhoArquivo(String caminhoArquivo) {
		this.caminhoArquivo = caminhoArquivo;
	}

	public Date getDtLancamento() {
		return dtLancamento;
	}

	public void setDtLancamento(Date dtLancamento) {
		this.dtLancamento = dtLancamento;
	}

	public Ocorrencia getOcorrenciaId() {
		return ocorrenciaId;
	}

	public void setOcorrenciaId(Ocorrencia ocorrenciaId) {
		this.ocorrenciaId = ocorrenciaId;
	}

	public StatusExecucao getFilaStatusExecucaoid() {
		return filaStatusExecucaoid;
	}

	public void setFilaStatusExecucaoid(StatusExecucao filaStatusExecucaoid) {
		this.filaStatusExecucaoid = filaStatusExecucaoid;
	}

	public Usuario getUsuarioId() {
		return usuarioId;
	}

	public void setUsuarioId(Usuario usuarioId) {
		this.usuarioId = usuarioId;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (id != null ? id.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are
		// not set
		if (!(object instanceof Historico)) {
			return false;
		}
		Historico other = (Historico) object;
		if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "br.com.ro.model.entity.Historico[ id=" + id + " ]";
	}

}
